package lk.icta.common.util;

import lk.icta.common.AppConstants;

/**
 * @author Tharanga Punchihewa
 */
public class Talent {
    private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Talent.class);

    public static String Talent(int code, String language) {

        if (AppConstants.SINHALA.equals(language)) {
            switch (code) {
                case 0:
                    return "VERY GOOD in si";
                case 1:
                    return "GOOD in si";
                case 2:
                    return "GENERAL in si";
                case 3:
                    return "NO in si";
            }
        } else if (AppConstants.TAMIL.equals(language)) {
            switch (code) {
                case 0:
                    return "VERY GOOD in ta";
                case 1:
                    return "GOOD in ta";
                case 2:
                    return "GENERAL in ta";
                case 3:
                    return "NO in ta";
            }
        } else if (AppConstants.ENGLISH.equals(language)) {
            switch (code) {
                case 0:
                    return "VERY GOOD";
                case 1:
                    return "GOOD";
                case 2:
                    return "GENERAL";
                case 3:
                    return "NO";
            }
        } else {
            logger.error("Invalid language : {}", language);
            throw new IllegalArgumentException("Invalid language : " + language);
        }
        logger.error("Invalid gender code : {}", code);
        throw new IllegalArgumentException("Invalid talent code : {}");
    }
}
